Skip to content

Conversation

reidbaker
Copy link
Contributor

Fixes flutter/flutter/issues/176027

  • Update tooling to enforce java 17 compile options and kotlinOptions
  • Update interactive_media_ads and camera_android
  • Update compileOptions to java 17
  • Update changelog and pubspec for modified packages
  • Fix pigeon example

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates a number of packages to Java 17. This includes updating build.gradle files to set Java 17 compatibility, updating pubspec.yaml files with new SDK constraints, and adding corresponding changelog entries. The PR also updates the gradle-check tool to enforce these new Java 17 requirements, including a check for kotlinOptions configuration. My review focuses on improving the robustness of the updated tool script.

Comment on lines 359 to 370
final bool hasCompabilityVersions = gradleLines.any((String line) =>
line.contains('sourceCompatibility') && !_isCommented(line)) &&
line.contains('sourceCompatibility = JavaVersion.VERSION_$requiredJavaVersion') && !_isCommented(line)) &&
// Newer toolchains default targetCompatibility to the same value as
// sourceCompatibility, but older toolchains require it to be set
// explicitly. The exact version cutoff (and of which piece of the
// toolchain; likely AGP) is unknown; for context see
// https://github.com/flutter/flutter/issues/125482
gradleLines.any((String line) =>
line.contains('targetCompatibility') && !_isCommented(line));
line.contains('targetCompatibility = JavaVersion.VERSION_$requiredJavaVersion') && !_isCommented(line));

This comment was marked as off-topic.

Comment on lines +400 to +402
final bool kotlinOptionsUsesJavaVersion = gradleLines.any((String line) =>
line.contains('jvmTarget = JavaVersion.VERSION_$requiredJavaVersion') &&
!_isCommented(line));

This comment was marked as off-topic.

final bool kotlinOptionsUsesJavaVersion = gradleLines.any((String line) =>
line.contains('jvmTarget = JavaVersion.VERSION_$requiredJavaVersion') &&
!_isCommented(line));
// Either does not set kotlinOptions or does and uses non-string based syntax.

This comment was marked as off-topic.

Copy link
Contributor

@bparrishMines bparrishMines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@reidbaker reidbaker force-pushed the i176027_attempt_4_non_examples branch from 1045ced to 5ec1943 Compare October 9, 2025 19:30
Copy link
Contributor

auto-submit bot commented Oct 10, 2025

autosubmit label was removed for flutter/packages/10201, because - The status or check suite Linux repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2025
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2025
Copy link
Contributor

auto-submit bot commented Oct 10, 2025

autosubmit label was removed for flutter/packages/10201, because - The status or check suite Linux_android android_platform_tests_shard_2 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2025
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2025
Copy link
Contributor

auto-submit bot commented Oct 10, 2025

autosubmit label was removed for flutter/packages/10201, because - The status or check suite Linux_android android_platform_tests_shard_2 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2025
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 13, 2025
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 13, 2025
Copy link
Contributor

auto-submit bot commented Oct 13, 2025

autosubmit label was removed for flutter/packages/10201, because - The status or check suite Mac_x64 build_all_packages stable has failed. Please fix the issues identified (or deflake) before re-applying this label.

@reidbaker
Copy link
Contributor Author

reidbaker commented Oct 13, 2025

I filed an issue for the repeated infra failures mac tests flutter/flutter#176914

@reidbaker
Copy link
Contributor Author

reidbaker commented Oct 14, 2025

The failing "Linux_web web_platform_tests_wasm_shard_1 master" is google_sign_in_web which is a package that is not touched in is pr. Discord thread it looks like this test has flaked on the main dashboard as well. https://discord.com/channels/608014603317936148/608020293944082452/1427377579500896278

@reidbaker
Copy link
Contributor Author

The failing "Linux_web web_platform_tests_wasm_shard_1 master" is google_sign_in_web which is a package that is not touched in is pr. Discord thread it looks like this test has flaked on the main dashboard as well. https://discord.com/channels/608014603317936148/608020293944082452/1427377579500896278

Tracked in flutter/flutter#176299

@reidbaker reidbaker added emergency Override tree-status signal (land even with closed tree), combine with the autosubmit label. autosubmit Merge PR when tree becomes green via auto submit App labels Oct 14, 2025
@flutter-dashboard
Copy link

Detected the emergency label.

If you add the autosubmit label, the bot will wait until all presubmits pass but ignore the tree status, allowing fixes for tree breakages while still validating that they don't break any existing presubmits.

The "Merge" button is also unlocked. To bypass presubmits as well as the tree status, press the GitHub "Add to Merge Queue".

1 similar comment
@flutter-dashboard
Copy link

Detected the emergency label.

If you add the autosubmit label, the bot will wait until all presubmits pass but ignore the tree status, allowing fixes for tree breakages while still validating that they don't break any existing presubmits.

The "Merge" button is also unlocked. To bypass presubmits as well as the tree status, press the GitHub "Add to Merge Queue".

@auto-submit auto-submit bot merged commit 1c0be20 into flutter:main Oct 14, 2025
77 of 80 checks passed
@reidbaker reidbaker deleted the i176027_attempt_4_non_examples branch October 14, 2025 17:58
@reidbaker
Copy link
Contributor Author

I talked with @stuartmorgan-g out of band and we agreed to land this pr on red because the nature of the flakes is not something we want to wait on. The flakes are appear to be either out of band or no known root cause. The number of packages impacted here is large and the risk is minimal. Tooling support is being expanded in #10206

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate flutter owned packages to use jvm version 17 (away from jvm 11)

5 participants